Omplus.base
    .define(
    Omplus.views.Panel,
    {
        omplusName:"pagePanel",
        renderTo:"body",
        showEffect:{
            name:"fade",
            time:500
        },
        hideEffect:{
            name:"fade",
            time:500
        },
        layout:{
            omplusType:"VerticalLayout"
        },
        onCloseFinish:function () {
            window.location = "";
        },
        onRenderFinish:function () {
            Omplus.globals.getObject("User")
                .getAction("isLoggedIn").callback = function () {
                if (Omplus.globals.getObject("User").getStatus() == Omplus.constants.status_error) {
                    Omplus.globals.getObject("User").getAction(
                        "logOut").run();
                } else {
                    setTimeout(
                        'Omplus.globals.getObject("User").getAction("isLoggedIn").run()',
                        10000);
                }
            }
            setTimeout(
                'Omplus.globals.getObject("User").getAction("isLoggedIn").run()',
                10000);
        },
        components:[
            {
                omplusType:"Panel",
                omplusName:"headerPanel",
                height:"115px",
                layout:{
                    omplusType:"HorizontalLayout",
                    width:"1000px",
                    height:"100px"
                },
                components:[
                    {
                        omplusType:"Panel",
                        omplusName:"headerUserPanel",
                        width:"400px",
                        height:"60px",
                        layout:{
                            omplusType:"VerticalLayout"
                        },
                        components:[
                            {
                                omplusType:"Label",
                                omplusName:"welcomeNavbarLabel",
                                model:"Assets.list.label_welcome.localValue",
                                controller:"languageController",
                                width:"400px",
                                cssClasses:[ "welcome" ]
                            },
                            {
                                omplusType:"Label",
                                omplusName:"nicknameNavbarLabel",
                                model:"User.username",
                                controller:"userController",
                                width:"400px"
                            },
                            {
                                omplusType:"Button",
                                omplusName:"logoutNavbarButton",
                                model:"Assets.list.label_logout.localValue",
                                controller:"languageController",
                                width:"400px",
                                click:function () {
                                    Omplus.globals.getObject(
                                        "User").getAction(
                                        "logOut").run();
                                }
                            }
                        ]
                    }
                ]
            },
            {
                omplusType:"Navbar",
                omplusName:"navbar",
                buttons:[
                    {
                        mainButton:{
                            model:"Assets.list.myaccount_label.localValue",
                            management:"myaccountPanel"
                        }
                    },
                    {
                        mainButton:{
                            model:"Assets.list.users_label.localValue",
                            management:"usersPanel"
                        }
                    },
                    {
                        mainButton:{
                            model:"Assets.list.anketari_label.localValue",
                            management:"anketariPanel"
                        }
                    },
                    {
                        mainButton:{
                            model:"Assets.list.forms_label.localValue",
                            management:"formsPanel"
                        }
                    },
                    {
                        mainButton:{
                            model:"Assets.list.returned_forms_label.localValue",
                            management:"returnedFormsPanel"
                        }
                    },
                    {
                        mainButton:{
                            model:"Assets.list.kontrola_forms_label.localValue",
                            management:"kontrolaFormsPanel"
                        }
                    }

                ]
            },
            // Managements
            {
                omplusType:"Panel",
                omplusName:"managements",
                components:[],
                layout:{
                    omplusType:"VerticalLayout",
                    width:"1000px"
                }
            }
        ]
    });

Omplus.base
    .define(
    Omplus.views.Panel,
    {
        omplusName:"statusPanel",
        renderTo:"body",
        showEffect:{
            name:"slide",
            time:600,
            options:{
                direction:"left"
            }
        },
        hideEffect:{
            name:"slide",
            time:600,
            options:{
                direction:"left"
            }
        },
        components:[
            {
                omplusType:"StatusNotificator",
                omplusName:"statusesNotificator",
                models:[
                    {
                        omplusName:"NewUser",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"UpdateUser",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"UsersSearchResults",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"userChooser.current",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"EditUser",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"AnketariSearchResults",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"EditAnketari",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"NewForm",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"formsChooser.current",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"FormsSearchResults",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"returnedChooser.current",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"ReturnedFormsSearchResults",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"kontrolaChooser.current",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"KontrolaFormsSearchResults",
                        successModel:"Assets.list.label_done.localValue"
                    },
                    {
                        omplusName:"Remarks",
                        successModel:"Assets.list.label_done.localValue"
                    }
                ]
            }
        ],
        onRenderFinish:function () {
        }
    });